from selenium import webdriver
from selenium.webdriver.common.action_chains import ActionChains
import time

driver = webdriver.Chrome()
driver.implicitly_wait(10)
driver.get('http://www.baidu.com')
time.sleep(2)
#定位元素
st_button = driver.find_element_by_name('tj_briicon')
# 设置鼠标悬停
ActionChains(driver).move_to_element(st_button).perform()

